import React from 'react'
import "../css/login.css"
class login extends React.Component {
    constructor(props) {
        super(props)
    }

    render() {
        return (
            <div>
                <h1>登录</h1>
                <div class="login_con">
                    <div class="login_box">
                        <div class="login_header">
                            <span class="sao">账号登录</span>
                            <span>|</span>
                            <span >扫码登录</span>
                        </div>
                        <div class="login_conte">
                            <input type="text" ref='name' placeholder="邮箱/手机号/小米ID" />
                            <input type="password" ref="pass" placeholder="密码" />
                            <button class="deng" onClick={() => {
                                console.log(111);
                                var name = this.refs.name.value;
                                var pass = this.refs.pass.value;
                                if (name.length == 0 || pass.length == 0) {
                                    alert("输入框不能为空")
                                    return
                                } else {
                                    alert("登录成功")
                                    this.props.history.push("./Header")
                                }

                            }}>登录</button>
                        </div>
                        <p>手机短信登录/注册</p>
                        <p>立即注册/忘记密码？</p>
                    </div>
                </div>
                </div>
        )
    }
    componentDidMount() {

    }
}
export default login